class Emoji {
  final int id;
  final String filePath;
  final String keywords;
  final DateTime createdAt;
  final int fileId;

  Emoji({
    required this.id,
    required this.filePath,
    required this.keywords,
    required this.createdAt,
    required this.fileId,
  });

  factory Emoji.fromMap(Map<String, dynamic> map) {
    return Emoji(
      id: map['id'],
      filePath: map['file_path'],
      keywords: map['keywords'] ?? '',
      createdAt: DateTime.fromMillisecondsSinceEpoch(map['created_at']),
      fileId: map['file_id'],
    );
  }
}
